/*     */ package com.lmpop.trade.ti_resume;
/*     */ 
/*     */ import com.lmpop.frame.QueryList;
/*     */ import com.lmpop.frame.SysMap;
/*     */ import com.lmpop.frame.TradeInterf;
/*     */ import com.lmpop.frame.dao.DbmInterf;
/*     */ import com.lmpop.frame.exp.ApplicationException;
/*     */ import com.lmpop.frame.util.FileIO;
/*     */ import com.lmpop.updateHtml.parseXml.Config;
/*     */ import com.lmpop.updateHtml.updateHtml.UpdateArticleHtml;
/*     */ import java.util.Hashtable;
/*     */ import java.util.List;
/*     */ import java.util.Map;
/*     */ 
/*     */ public class Ti_resumeInfo
/*     */   implements TradeInterf
/*     */ {
/*     */   QueryList queryList;
/*     */   FileIO io;
/*     */   Config conf;
/*     */   String rootpath;
/*     */   UpdateArticleHtml uah;
/*     */ 
/*     */   public Ti_resumeInfo()
/*     */   {
/*  23 */     this.queryList = new QueryList();
/*  24 */     this.uah = new UpdateArticleHtml();
/*  25 */     this.io = new FileIO();
/*  26 */     this.conf = new Config();
/*  27 */     this.conf.init();
/*  28 */     this.rootpath = this.conf.getString("rootpath");
/*     */   }
/*     */ 
/*     */   public SysMap insert(DbmInterf dbmMgr, SysMap map)
/*     */   {
/*  36 */     Ti_resume ti_resume = new Ti_resume();
/*  37 */     ti_resume.setResume_id(map.getString("resume_id"));
/*  38 */     ti_resume.setCust_id(map.getString("cust_id"));
/*  39 */     ti_resume.setResume_title(map.getString("resume_title"));
/*  40 */     ti_resume.setResume_name(map.getString("resume_name"));
/*  41 */     ti_resume.setSex(map.getString("sex"));
/*  42 */     ti_resume.setBirth(map.getString("birth"));
/*  43 */     ti_resume.setWork_date(map.getString("work_date"));
/*  44 */     ti_resume.setMarriage(map.getString("marriage"));
/*  45 */     ti_resume.setArea_attr(map.getString("area_attr"));
/*  46 */     ti_resume.setCert_type(map.getString("cert_type"));
/*  47 */     ti_resume.setCert_number(map.getString("cert_number"));
/*  48 */     ti_resume.setOversea(map.getString("oversea"));
/*  49 */     ti_resume.setPolitical(map.getString("political"));
/*  50 */     ti_resume.setAccount_location(map.getString("account_location"));
/*  51 */     ti_resume.setAddress(map.getString("address"));
/*  52 */     ti_resume.setMail_addr(map.getString("mail_addr"));
/*  53 */     ti_resume.setPost_code(map.getString("post_code"));
/*  54 */     ti_resume.setFrist_contact(map.getString("frist_contact"));
/*  55 */     ti_resume.setEmail(map.getString("email"));
/*  56 */     ti_resume.setBlog(map.getString("blog"));
/*  57 */     ti_resume.setSelf_title(map.getString("self_title"));
/*  58 */     ti_resume.setSelf_content(map.getString("self_content"));
/*  59 */     ti_resume.setQ_work_kind(map.getString("q_work_kind"));
/*  60 */     ti_resume.setQ_work_addr(map.getString("q_work_addr"));
/*  61 */     ti_resume.setQ_work_career(map.getString("q_work_career"));
/*  62 */     ti_resume.setQ_work_biz(map.getString("q_work_biz"));
/*  63 */     ti_resume.setQ_work_salary(map.getString("q_work_salary"));
/*  64 */     ti_resume.setPosts(map.getString("posts"));
/*  65 */     ti_resume.setState_code(map.getString("state_code"));
/*  66 */     ti_resume.setStart_date(map.getString("start_date"));
/*  67 */     ti_resume.setEnd_date(map.getString("end_date"));
/*  68 */     ti_resume.setCollege_name(map.getString("college_name"));
/*  69 */     ti_resume.setSpecialty(map.getString("specialty"));
/*  70 */     ti_resume.setDegree(map.getString("degree"));
/*  71 */     ti_resume.setUpdate_time(map.getString("update_time"));
/*  72 */     ti_resume.setUser_id(map.getString("user_id"));
/*     */ 
/*  74 */     String result_code = "0";
/*     */     try {
/*  76 */       insert(dbmMgr, ti_resume);
/*     */     } catch (ApplicationException e) {
/*  78 */       e.printStackTrace();
/*  79 */       result_code = "1";
/*     */     }
/*  81 */     map.setString("result_code", result_code);
/*  82 */     return map;
/*     */   }
/*     */ 
/*     */   public void insert(DbmInterf dbmMgr, Ti_resume ti_resume)
/*     */     throws ApplicationException
/*     */   {
/*  91 */     dbmMgr.update("insertTi_resume", ti_resume);
/*     */   }
/*     */ 
/*     */   public SysMap create_alterPage(DbmInterf dbmMgr, SysMap map) {
/*  95 */     this.uah.updateArticleByGoodsId("gS10pU7R18hj8S4", map.getString("resume_id"), "0", "1");
/*  96 */     return map;
/*     */   }
/*     */ 
/*     */   public SysMap delete(DbmInterf dbmMgr, SysMap map)
/*     */   {
/* 104 */     String pkid_string = map.getString("pkid");
/* 105 */     String result_code = "0";
/*     */     try {
/* 107 */       if (!pkid_string.equals("")) {
/* 108 */         String[] pkStr = pkid_string.split("\\|");
/* 109 */         List list = null;
/* 110 */         String publish_date = "";
/* 111 */         for (int i = 0; i < pkStr.length; i++)
/* 112 */           if (!pkStr[i].equals("")) {
/* 113 */             list = this.queryList.getList("getTi_resumeByPk", pkStr[i]);
/* 114 */             publish_date = ((Hashtable)list.get(0)).get("update_time").toString();
/* 115 */             publish_date = publish_date.substring(0, 10);
/* 116 */             delete(dbmMgr, pkStr[i]);
/* 117 */             FileIO.DelFile(this.rootpath + "/data/jinseyaoshi/resume/" + publish_date + "/" + pkStr[i] + ".html");
/*     */           }
/*     */       }
/*     */     }
/*     */     catch (ApplicationException e) {
/* 122 */       e.printStackTrace();
/* 123 */       result_code = "1";
/*     */     }
/* 125 */     map.setString("result_code", result_code);
/* 126 */     return map;
/*     */   }
/*     */ 
/*     */   public void delete(DbmInterf dbmMgr, String pkid)
/*     */     throws ApplicationException
/*     */   {
/* 135 */     dbmMgr.update("deleteTi_resume", pkid);
/*     */   }
/*     */ 
/*     */   public SysMap update(DbmInterf dbmMgr, SysMap map)
/*     */   {
/* 144 */     Ti_resume ti_resume = new Ti_resume();
/* 145 */     ti_resume.setResume_id(map.getString("resume_id"));
/* 146 */     ti_resume.setCust_id(map.getString("cust_id"));
/* 147 */     ti_resume.setResume_title(map.getString("resume_title"));
/* 148 */     ti_resume.setResume_name(map.getString("resume_name"));
/* 149 */     ti_resume.setSex(map.getString("sex"));
/* 150 */     ti_resume.setBirth(map.getString("birth"));
/* 151 */     ti_resume.setWork_date(map.getString("work_date"));
/* 152 */     ti_resume.setMarriage(map.getString("marriage"));
/* 153 */     ti_resume.setArea_attr(map.getString("area_attr"));
/* 154 */     ti_resume.setCert_type(map.getString("cert_type"));
/* 155 */     ti_resume.setCert_number(map.getString("cert_number"));
/* 156 */     ti_resume.setOversea(map.getString("oversea"));
/* 157 */     ti_resume.setPolitical(map.getString("political"));
/* 158 */     ti_resume.setAccount_location(map.getString("account_location"));
/* 159 */     ti_resume.setAddress(map.getString("address"));
/* 160 */     ti_resume.setMail_addr(map.getString("mail_addr"));
/* 161 */     ti_resume.setPost_code(map.getString("post_code"));
/* 162 */     ti_resume.setFrist_contact(map.getString("frist_contact"));
/* 163 */     ti_resume.setEmail(map.getString("email"));
/* 164 */     ti_resume.setBlog(map.getString("blog"));
/* 165 */     ti_resume.setSelf_title(map.getString("self_title"));
/* 166 */     ti_resume.setSelf_content(map.getString("self_content"));
/* 167 */     ti_resume.setQ_work_kind(map.getString("q_work_kind"));
/* 168 */     ti_resume.setQ_work_addr(map.getString("q_work_addr"));
/* 169 */     ti_resume.setQ_work_career(map.getString("q_work_career"));
/* 170 */     ti_resume.setQ_work_biz(map.getString("q_work_biz"));
/* 171 */     ti_resume.setQ_work_salary(map.getString("q_work_salary"));
/* 172 */     ti_resume.setPosts(map.getString("posts"));
/* 173 */     ti_resume.setState_code(map.getString("state_code"));
/* 174 */     ti_resume.setStart_date(map.getString("start_date"));
/* 175 */     ti_resume.setEnd_date(map.getString("end_date"));
/* 176 */     ti_resume.setCollege_name(map.getString("college_name"));
/* 177 */     ti_resume.setSpecialty(map.getString("specialty"));
/* 178 */     ti_resume.setDegree(map.getString("degree"));
/* 179 */     ti_resume.setUpdate_time(map.getString("update_time"));
/* 180 */     ti_resume.setUser_id(map.getString("user_id"));
/*     */ 
/* 182 */     String result_code = "0";
/*     */     try {
/* 184 */       update(dbmMgr, ti_resume);
/* 185 */       this.uah.updateArticleByGoodsId("gS10pU7R18hj8S4", map.getString("resume_id"), "0", "1");
/*     */     } catch (ApplicationException e) {
/* 187 */       e.printStackTrace();
/* 188 */       result_code = "1";
/*     */     }
/* 190 */     map.setString("result_code", result_code);
/* 191 */     return map;
/*     */   }
/*     */ 
/*     */   public void update(DbmInterf dbmMgr, Ti_resume ti_resume)
/*     */     throws ApplicationException
/*     */   {
/* 200 */     dbmMgr.update("updateTi_resume", ti_resume);
/*     */   }
/*     */ 
/*     */   public List getListByPage(Object obj, int start, int limit)
/*     */   {
/* 211 */     Map ti_resume = (Hashtable)obj;
/* 212 */     if (start == 0)
/* 213 */       start = 0;
/*     */     else {
/* 215 */       start = (start - 1) * limit;
/*     */     }
/* 217 */     ti_resume.put("start", Integer.valueOf(start));
/* 218 */     ti_resume.put("limit", Integer.valueOf(limit));
/* 219 */     return this.queryList.getList("getListByTi_resumePage", ti_resume);
/*     */   }
/*     */ 
/*     */   public int getCountByObj(Object obj)
/*     */   {
/* 231 */     Map ti_resume = (Hashtable)obj;
/* 232 */     List list = this.queryList.getList("getCountByObjTi_resume", ti_resume);
/* 233 */     int count = 0;
/* 234 */     if ((list != null) && (list.size() > 0)) {
/* 235 */       Hashtable newsMap = (Hashtable)list.get(0);
/* 236 */       if ((newsMap.get("count") != null) && (!newsMap.get("count").toString().equals(""))) {
/* 237 */         count = Integer.parseInt(newsMap.get("count").toString());
/*     */       }
/*     */     }
/* 240 */     return count;
/*     */   }
/*     */ 
/*     */   public String getresumeByselect(String cust_id)
/*     */   {
/* 249 */     String select = "";
/* 250 */     String resume_id = ""; String resume_name = "";
/* 251 */     List list = this.queryList.getList("getresumeByselect", cust_id);
/* 252 */     if ((list != null) && (list.size() > 0)) {
/* 253 */       for (int i = 0; i < list.size(); i++) {
/* 254 */         Hashtable newsMap = (Hashtable)list.get(i);
/* 255 */         if ((newsMap.get("resume_id") != null) && (!newsMap.get("resume_id").toString().equals(""))) {
/* 256 */           resume_id = newsMap.get("resume_id").toString();
/*     */         }
/* 258 */         if ((newsMap.get("resume_title") != null) && (!newsMap.get("resume_title").toString().equals(""))) {
/* 259 */           resume_name = newsMap.get("resume_title").toString();
/*     */         }
/* 261 */         select = select + "<option value=" + resume_id + ">" + resume_name + "</option>";
/*     */       }
/*     */     }
/* 264 */     return select;
/*     */   }
/*     */ 
/*     */   public List getListByPk(String pk)
/*     */   {
/* 273 */     return this.queryList.getList("getTi_resumeByPk", pk);
/*     */   }
/*     */ 
/*     */   public SysMap upateState(DbmInterf dbmMgr, SysMap map)
/*     */   {
/* 283 */     Ti_resume ti_resume = new Ti_resume();
/*     */ 
/* 285 */     String pkid_string = map.getString("pkid");
/* 286 */     String state_code = map.getString("up_operating");
/* 287 */     ti_resume.setState_code(state_code);
/* 288 */     String result_code = "0";
/*     */     try {
/* 290 */       if (!pkid_string.equals("")) {
/* 291 */         String[] pkStr = pkid_string.split("\\|");
/* 292 */         for (int i = 0; i < pkStr.length; i++)
/* 293 */           if (!pkStr[i].equals("")) {
/* 294 */             ti_resume.setResume_id(pkStr[i]);
/* 295 */             upateState(dbmMgr, ti_resume);
/*     */           }
/*     */       }
/*     */     }
/*     */     catch (ApplicationException e)
/*     */     {
/* 301 */       e.printStackTrace();
/* 302 */       result_code = "1";
/*     */     }
/* 304 */     map.setString("result_code", result_code);
/* 305 */     return map;
/*     */   }
/*     */   public void upateState(DbmInterf dbmMgr, Ti_resume ti_resume) throws ApplicationException {
/* 308 */     dbmMgr.update("upateResumeState", ti_resume);
/*     */   }
/*     */ }

/* Location:           F:\电商\commons-utils.jar
 * Qualified Name:     com.lmpop.trade.ti_resume.Ti_resumeInfo
 * JD-Core Version:    0.6.0
 */